'''
This file serves as configuration file for the PyCoi.

Created on 18.11.2012

@author: B. Wilbertz
'''
import pytz
from Utilities import readTZfromFilesystem

pumpTime = 0.2
pumpCoolDownTime = 10
crossModeBlinkInterval = 2
blinkTime = 0.01
GPIOInterval = 0.05
bounceInterval = 0.01
sleepTimeTemperature = 20

pumpInterval = 10000
crossModeFactor = 0.6
rainModeFactor = 0.5

NPumpStrokesRegular = 1
CrossModeAddPumpStrokes = 3
RainModeAddPumpStrokes = 1
XtraModeMaxPumpStrokes = 7

XtraModeRainDistancePerStroke = 500
XtraModeDryDistance = 2000

minimalValidSpeedInMperSec = 1
maxTimeDelta = 60 * 20          # 20min

nonlinearSpeedProgression = True 

rainSignalAlpha = 0.97
rainSignalEntryLimitRain = 0.25
rainSignalEntryLimitDry = 0.75

#tempSensorID = "00000463821d"
tempSensorID = "00000485a045"

statFile="log/rasCoi.stat"
logFile="log/PyCoi.log"

class Wiring:
    crossModeLED = 18
    crossModeSwitch = 24
    rainModeLED = 23
    pump = 8
    rainSensor = 22
    rainSensorOut1 = 17
    rainSensorOut2 = 27
    
pins = Wiring()

tz_utc = pytz.UTC
tz_local = pytz.timezone(readTZfromFilesystem())
